package com.zigong.app.http;

import com.google.gson.annotations.SerializedName;
import com.zigong.app.beans.NewsItem;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/10.
 */

public class ListObj<T> implements Serializable {
    private static final long serialVersionUID = 6365035763949672228L;
    @SerializedName(value = "list", alternate = {"channel", "newsList", "livesList", "programme", "programmeList", "dynamicList",
            "specialDetailList", "newsArray", "liveList", "institutionList", "voteResult", "commentList", "timeLineList"
            , "anchorDoc", "timelineList", "specialList","addrInfo","recordList"})
    private List<T> list;
    private int ShowType;
    /**
     * 总页数
     */
    @SerializedName(value = "pageAll", alternate = {"timeLineCount"})
    private int pageAll;
    /**
     * 当前页号
     */
    private int pageIndex = -1;
    /**
     * 栏目模版
     */
    private int template;
    /**
     * 评论总数
     */
    private int commentCount;
    /**
     * 分享链接
     */
    private String sharedUrl;
    /**
     * 专题id
     */
    private String specialId;
    /**
     * 顶部图片
     */
    private String topImage;
    /**
     * 顶部标题
     */
    private String topTitle;
    /**
     * 顶部视频链接
     */
    private String topVideo;
    /**
     * 卫视回看url
     */
    private String lookbackUrl;
    /**
     * 参与投票总数
     */
    private int voteCount;

    private ArrayList<NewsItem> subSpecialList;

    public int size() {
        if (list != null) {
            return list.size();
        }
        return 0;
    }

    public List<T> getList() {
        return list;
    }

    public ListObj setList(List<T> list) {
        this.list = list;
        return this;
    }

    public int getShowType() {
        return ShowType;
    }

    public void setShowType(int showType) {
        ShowType = showType;
    }

    public int getPageAll() {
        return pageAll;
    }

    public void setPageAll(int pageAll) {
        this.pageAll = pageAll;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getTemplate() {
        return template;
    }

    public void setTemplate(int template) {
        this.template = template;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public String getSharedUrl() {
        return sharedUrl;
    }

    public void setSharedUrl(String sharedUrl) {
        this.sharedUrl = sharedUrl;
    }

    public String getSpecialId() {
        return specialId;
    }

    public void setSpecialId(String specialId) {
        this.specialId = specialId;
    }

    public String getTopImage() {
        return topImage;
    }

    public void setTopImage(String topImage) {
        this.topImage = topImage;
    }

    public String getTopTitle() {
        return topTitle;
    }

    public void setTopTitle(String topTitle) {
        this.topTitle = topTitle;
    }

    public String getTopVideo() {
        return topVideo;
    }

    public void setTopVideo(String topVideo) {
        this.topVideo = topVideo;
    }

    public String getLookbackUrl() {
        return lookbackUrl;
    }

    public void setLookbackUrl(String lookbackUrl) {
        this.lookbackUrl = lookbackUrl;
    }

    public int getVoteCount() {
        return voteCount;
    }

    public void setVoteCount(int voteCount) {
        this.voteCount = voteCount;
    }

    public ArrayList<NewsItem> getSubSpecialList() {
        return subSpecialList;
    }

    public void setSubSpecialList(ArrayList<NewsItem> subSpecialList) {
        this.subSpecialList = subSpecialList;
    }

    @Override
    public String toString() {
        return "ListObj{" +
                "list=" + list +
                '}';
    }
}
